This is the tutorial which took me two weeks to do!

1)  Install DeusEx, DeusEx SDK and extract the DeusEx Source.  Instructions on how to extract the DeusEx Source can be found at the bottom of the file.

2)  Before I start, I have to say thank you to the following ppl: EdGann of UC, Avenger916 of UC, Bolt of MM, Ghengis of DXF, whom without their dedicated help, I would not have been able to produce this tutorial.  This tutorial belongs to them.  Anyway, on with the show! 
Also, some explanations of the code maybe incorrect.  I apologise, it's not easy to learn this stuff.

Oh yeah, the point of the tutorial is to learn how to load a new HUD, which we can then load new menu's, etc, without changing the core DX code. :)

3)  Make the following directories: 

c:\deusex\mm 
c:\deusex\mm\classes

In the \classes\ directory, make two new files: MMDeusExHUD.uc and MMJCDentonMale.uc.  Now open MMDeusExHUD.uc.  Type in the following text:

class MMDeusExHUD expands DeusExHUD;

// ---------------------------------------------------------------------- 
// InitWindow() 
// ----------------------------------------------------------------------

event InitWindow() 
{ 
      Super.InitWindow();

} 
 

defaultproperties 
{ 
}

I can't remember why I have the InitWindow() function in their!  It doesn't seem to stop anything working though.  Now open MMJCDentonMale.uc, and type in the following: 
 

class MMJCDentonMale extends JCDentonMale; 
 

function Possess() 
{ 
local DeusExRootWindow root;

Super.Possess();

root = DeusExRootWindow(rootWindow);  
root.hud.Destroy();

root.hud = DeusExHUD(root.NewChild(Class'MMDeusExHUD')); 
root.hud.UpdateSettings(Self); 
root.hud.SetWindowAlignments(HALIGN_Full, VALIGN_Full, 0, 0); 
} 
 

defaultproperties 
{ 
}

This file is a subclass of the old JCDentonMale so we do not need all the old functions in it.  The HUD is defined in the Possess() function; why?  I don't know.  I do know it only works in that function. 
You need to Super.Possess() to run the rest of the Possess() function to set all the various variables that the HUD needs to work. 
local DeusExRootWindow root; This line sets the .uc file (DeusExRootWindow.uc) to be known as 'root'.  This is the same line as root = DeusExRootWindow ('cept that wouldn't work). 
The next line (root = DeusExRootWindow(rootWindow);) sets root to 'access' be the rootWindow function in DeusExRootWindow. 
This means: root.hud.Destroy(); Access the 'root' (defined previously), the 'hud' function, and execute function 'Destroy()'. 
This: root.hud = DeusExHUD(root.NewChild(Class'MMDeusExHUD')); means in the 'root' 'hud' function, define DeusExHUD to be the 'root' 'NewChild' (NewChild, I gather means to load a new function later to be accessed by the HUD), and the class file to be loaded is to be 'MMDeusExHUD' (which we should have made earlier). 
This: root.hud.UpdateSettings(Self); means to reload (update) the 'root' 'hud' 'UpdateSettings()' function, and pass 'Self' to it.  'Self' means the current file (in which the code is in; in this case MMJCDentonMale). 
This: root.hud.SetWindowAlignments(HALIGN_Full, VALIGN_Full, 0, 0); I presume means align the window to x,y,z,a where:

x = top left point 
y = top right point 
z = bottom left point 
a = bottom right point

4)  That is all the code (and explanation) we need.  Now save and close the current file.  Change the class= line in your c:\deusex\system\user.ini file to class=MM.MMJCDentonMale and compile the code.  You will not need to worry about deleting deusex.u, as we are not re-compiling \deusex\ pacakage, but if mm.u exists, delete that.

5)  Now start Deus Ex, and you will not notice a difference as we have not changed the actual HUD code itself, just the file the Deus Ex loads for the HUD.  Are you saying, "but how do I know it works, and it isn't loading the default HUD?"  If you are not, shame on you.  You always need to be critical in examining your own code.  If you are, like I did, then well done.  Try deleting mm.u, opening MMJCDentonMale.uc and getting rid of these lines:

root.hud = DeusExHUD(root.NewChild(Class'MMDeusExHUD')); 
root.hud.UpdateSettings(Self); 
root.hud.SetWindowAlignments(HALIGN_Full, VALIGN_Full, 0, 0);

These load the new HUD.  Without them, the HUD is still deleted from the DeleteHUD() function call in our file.  Save, re-compile, and you'll see no menu.  You'll still be able to use the menu, yes, and the buttons work, but you'll see no graphics.

Try it.

Until next time... 